package vip.ipav.spring.cloud;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;
import org.springframework.context.annotation.Bean;
import vip.ipav.spring.cloud.filters.SimpleFilter;

/**
 * 网关启动程序
 *
 */
@SpringBootApplication
@EnableZuulProxy
//@EnableDiscoveryClient
public class GatewayServer {
    public static void main(String[] args) {
        new SpringApplicationBuilder(GatewayServer.class).web(true).run(args);
    }

    @Bean
    public SimpleFilter preFilter() {
        return new SimpleFilter();
    }
}
